package com.neusoft.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface VerificationMapper {
	@Insert("insert into verificationcode values(#{userId},#{verificationCode})")
    public int saveVerificationCode(@Param("userId")String userId,@Param("verificationCode")String verificationCode);
	
	@Delete("delete from verificationcode where userId = #{userId} and verificationCode = #{verificationCode}")
    public int deleteVerificationCode(@Param("userId")String userId, @Param("verificationCode")String verificationCode);
	
	@Select("select verificationCode from verificationcode where userId = #{userId}")
	public String getVerificationCodeById(String userId);
}
